<template>
  <div class="container-y">

    <div class="step-wrap" v-if="$store.state.yjStep">
      <div class="step-item" v-for="(item,index) of $store.state.yjStep">
        <div class="sc">
          <span v-if="!$store.state.yjDetail[item.user]">{{index + 1}}</span>
          <span v-else class="mui-icon mui-icon-checkmarkempty"></span>
        </div>
        <div class="s1">{{item.name}}</div>
        <div class="s2">{{$store.state.yjDetail[item.user]}}</div>
        <div class="s2">{{$store.state.yjDetail[item.time]}}</div>
      </div>
    </div>
    <div class="d-item-wrap">
      <div class="d-title">
        应急处置详情
      </div>
      <div class="d-content">
        <div class="item"
             v-if="$store.state.yjList"
             v-for="item in $store.state.yjList">
          <div class="label">
            {{item.label}}
          </div>
          <div class="txt">
            <div class="txt-multiLine">
              {{item.content}}
            </div>
          </div>
        </div>
      </div>
    </div>

    <div class="d-item-wrap" v-if="$store.state.emergencyHistoryList.length">
      <div class="d-title">应急处置记录</div>
      <div class="d-content">
        <div class="item fold-hide"
             v-for="item in $store.state.emergencyHistoryList">
          <div class="feedBack-item">
            <div class="fb-label">处置状态：</div>
            {{item.businessStatusName}}
          </div>
          <div class="feedBack-item">
            <div class="fb-label">开始时间：</div>
            {{item.createTime}}
          </div>
          <div class="feedBack-item" v-if="item.completeTime">
            <div class="fb-label">结束时间：</div>
            {{item.completeTime}}
          </div>
          <div class="feedBack-item" v-if="!!item.atData">
            <div class="fb-label">报告：</div>
            <a :href="item.atData.report_url">{{item.atData.report_url}}</a>
          </div>
          <div class="feedBack-item" v-if="!!item.atData">
            <div class="fb-label">证据：</div>
            <a :href="item.atData.report_url">{{item.atData.evidence_url}}</a>
          </div>
          <div class="feedBack-item" v-if="!!item.atData">
            <div class="fb-label">视频：</div>
            <a :href="item.atData.report_url">{{item.atData.video[0].download_url}}</a>
          </div>
          <div class="feedBack-item">
            <div class="fb-label">处置要求：</div>
            {{item.require}}
          </div>
          <div class="feedBack-item" v-if="!!item.atData">
            <div class="fb-label">描述：</div>
            {{item.atData.rq}}
          </div>
        </div>
      </div>
      <foldWrap :list="$store.state.emergencyHistoryList"></foldWrap>
    </div>

    <div class="pdb"></div>

  </div>
</template>

<script>
  import foldWrap from "../commonComponents/fold.vue"

  export default {
    data() {
      return {
        headerFlag: "",
      }
    },
    created(){
      this.headerFlag = this.$store.state.showFlag;
      _methods.headerTitleChange(116);
    },
    components:{
      foldWrap
    },
    beforeDestroy() {
      _methods.headerTitleChange(this.headerFlag, true);
    }
  }

</script>
